<template>
  <section class="app-main">
    <transition name="fade-transform" mode="out-in">
      <router-view :key="key" />
    </transition>
  </section>
</template>

<script>
export default {
  name: "AppMain",
  computed: {
    key() {
      return this.$route.path;
    }
  }
};
</script>

<style lang="scss" scoped>
@import "~@/styles/variables.scss";
@import "~@/styles/resetElement.scss";
.app-main {
  height: calc(
    100% - #{$footerHeight + $hamburgerToHeaderHeight+$tagsViewHeight + $footerMarginTopHeight}
  );
  position: relative;
  overflow: auto;
  overflow-x: hidden;
  background-color: $appMainBgColor;
  color: $appMainTextColor;
  padding: 0 10px;
  margin-bottom: $footerMarginTopHeight;
}

</style>

<style lang="scss">
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
  .fixed-header {
    padding-right: 15px;
  }
}
</style>
